package cn.iocoder.yudao.module.member.dal.mysql.recruitCompany;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.member.controller.admin.recruitCompany.vo.CompanyCountVO;
import cn.iocoder.yudao.module.member.controller.admin.recruitCompany.vo.RecruitCompanyExportReqVO;
import cn.iocoder.yudao.module.member.controller.admin.recruitCompany.vo.RecruitCompanyPageReqVO;
import cn.iocoder.yudao.module.member.dal.dataobject.company.CompanyDO;
import cn.iocoder.yudao.module.member.dal.dataobject.recruitCompany.DistributionDo;
import cn.iocoder.yudao.module.member.dal.dataobject.recruitCompany.JobAndInvitCountDo;
import cn.iocoder.yudao.module.member.dal.dataobject.recruitCompany.JobPassDo;
import cn.iocoder.yudao.module.member.dal.dataobject.recruitCompany.RecruitCompanyDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 招聘企业管理 Mapper
 *
 * @author 周枫皓
 */
@Mapper
public interface RecruitCompanyMapper extends BaseMapperX<RecruitCompanyDO> {


    default List<RecruitCompanyDO> selectList(RecruitCompanyExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<RecruitCompanyDO>()
                .eqIfPresent(RecruitCompanyDO::getStatus, reqVO.getStatus())
                .like(RecruitCompanyDO::getOperator, reqVO.getKeyWord()).or()
                .like(RecruitCompanyDO::getCompanyName, reqVO.getKeyWord())
                .orderByDesc(RecruitCompanyDO::getCompanyHot));
    }


    List<RecruitCompanyDO> selectList1(@Param("request") RecruitCompanyExportReqVO reqVO);

    List<RecruitCompanyDO> selectrecruitCompanyPage(@Param("request") RecruitCompanyPageReqVO recruitCompanyPageReqVO);

    Integer countRecruitCompany(@Param("recruitCompanyPageReqVO") RecruitCompanyPageReqVO recruitCompanyPageReqVO);


    List<RecruitCompanyDO> getHotCompanyJobList(@Param("startDate") Date startDate,@Param("endDate")  Date endDate);

    List<RecruitCompanyDO> getHotCompanyJobList1(@Param("startDate") String startDate,@Param("endDate")  String endDate);

    JobAndInvitCountDo  getJobAndinvitCount(@Param("startDate") Date startDate,@Param("endDate")  Date endDate);

    CompanyCountVO getHotCompanyCount(@Param("startDate") String startDate, @Param("endDate")  String endDate);

    List<DistributionDo> getCompanyDistribution(@Param("startDate") String startDate, @Param("endDate")  String endDate);


    JobAndInvitCountDo getJobAndinvitCountNew(@Param("dayFlowFlag") Integer dayFlowFlag,@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<JobPassDo> getFeedBackList(@Param("startDate") String startDate,@Param("endDate")  String endDate);

    List<DistributionDo> getJobDistribution(@Param("startDate") String startDate,@Param("endDate")  String endDate);

    List<DistributionDo> getStudentDistribution(@Param("startDate") String startDate,@Param("endDate")  String endDate);

    Long getSendStudentInfoCount(@Param("startDate") String startDate,@Param("endDate")  String endDate);

    List<CompanyDO> getNoShowCompanyList();

    List<RecruitCompanyDO> getRankingCompanyList(@Param("request") RecruitCompanyPageReqVO request);

    void updateCompanyHot(@Param("id") Long id,@Param("isHot") Integer isHot );

    void updateCompanyNew(@Param("id") Long id,@Param("isNew") Integer isNew );

    void rankingHotCompanySort(@Param("list") List<CompanyDO> list);

    void rankingNewCompanySort(@Param("list") List<CompanyDO> list);
}
